#pragma once
#include <vector>
#include "mtypes.h"

/* Geometry object: calculating statistics (how much polygons are being rendered).
 * Usage: just inherit your class, which renders some polygons, and override NumPolygons(). 
 * Engine must call UpdateNumPolygons() ONCE after loading scene, and use
 * GetNumPolygons() to get the value.
 */
class CGeometryObject
{
private:
    static std::vector< CGeometryObject * > m_GeometryObjects;
    static mUInt m_uSumPolygonsCount;

protected:
    virtual mUInt NumPolygons ( ) = 0;

public:
    CGeometryObject                ( );
    static void   UpdateNumPolygons( );
    static mUInt  GetNumPolygons   ( );
};